<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>SnakeProject: GameManager Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">SnakeProject
   &#160;<span id="projectnumber">0.0.2</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_game_manager.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="struct_game_manager-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">GameManager Struct Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="_game_manager_8h_source.html">GameManager.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:af055cc09d2692980e407af88b7fa571d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_game_manager.html#af055cc09d2692980e407af88b7fa571d">PlayerCrashCheck</a> ()</td></tr>
<tr class="memdesc:af055cc09d2692980e407af88b7fa571d"><td class="mdescLeft">&#160;</td><td class="mdescRight">플레이어의 충돌 여부를 체크를 해주는 함수.  <a href="#af055cc09d2692980e407af88b7fa571d">More...</a><br/></td></tr>
<tr class="separator:af055cc09d2692980e407af88b7fa571d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a01b7a86bb75c3f9f298cbfe14d029439"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a01b7a86bb75c3f9f298cbfe14d029439"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>GameReset</b> ()</td></tr>
<tr class="separator:a01b7a86bb75c3f9f298cbfe14d029439"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad40e6b7cd216c78a6d1332206c07c5f0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_game_manager.html#ad40e6b7cd216c78a6d1332206c07c5f0">GameRun</a> ()</td></tr>
<tr class="memdesc:ad40e6b7cd216c78a6d1332206c07c5f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">게임에 대한 루프가 돌아갈 함수  <a href="#ad40e6b7cd216c78a6d1332206c07c5f0">More...</a><br/></td></tr>
<tr class="separator:ad40e6b7cd216c78a6d1332206c07c5f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a90d63702413c8d2f2f1e848e820aaed8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_game_manager.html#a90d63702413c8d2f2f1e848e820aaed8">Updata</a> ()</td></tr>
<tr class="memdesc:a90d63702413c8d2f2f1e848e820aaed8"><td class="mdescLeft">&#160;</td><td class="mdescRight">게임 루프 중 데이터를 갱신해주는 함수.  <a href="#a90d63702413c8d2f2f1e848e820aaed8">More...</a><br/></td></tr>
<tr class="separator:a90d63702413c8d2f2f1e848e820aaed8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac1bd6de1844831d097b24a13a0e6a5a5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac1bd6de1844831d097b24a13a0e6a5a5"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_game_manager.html#ac1bd6de1844831d097b24a13a0e6a5a5">Render</a> ()</td></tr>
<tr class="memdesc:ac1bd6de1844831d097b24a13a0e6a5a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">플레이어 및 맵을 렌더링 해주는 부분. <br/></td></tr>
<tr class="separator:ac1bd6de1844831d097b24a13a0e6a5a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5891d3ff1898ee458dd6d30afed49858"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5891d3ff1898ee458dd6d30afed49858"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>InputKey</b> ()</td></tr>
<tr class="separator:a5891d3ff1898ee458dd6d30afed49858"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a14e1c3e5cb61d8fba4a87e78c35905be"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_game_manager.html#a14e1c3e5cb61d8fba4a87e78c35905be">Menu</a> ()</td></tr>
<tr class="memdesc:a14e1c3e5cb61d8fba4a87e78c35905be"><td class="mdescLeft">&#160;</td><td class="mdescRight">메뉴 출력 함수.  <a href="#a14e1c3e5cb61d8fba4a87e78c35905be">More...</a><br/></td></tr>
<tr class="separator:a14e1c3e5cb61d8fba4a87e78c35905be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05c74507d748a75b12d0b9fb3f6a2096"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_game_manager.html#a05c74507d748a75b12d0b9fb3f6a2096">Ending</a> ()</td></tr>
<tr class="memdesc:a05c74507d748a75b12d0b9fb3f6a2096"><td class="mdescLeft">&#160;</td><td class="mdescRight">엔딩 부분을 출력해주기 위한 함수.  <a href="#a05c74507d748a75b12d0b9fb3f6a2096">More...</a><br/></td></tr>
<tr class="separator:a05c74507d748a75b12d0b9fb3f6a2096"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a79f17ba29805e53adb3c8debb81734dd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a79f17ba29805e53adb3c8debb81734dd"></a>
SDL_Surface *&#160;</td><td class="memItemRight" valign="bottom"><b>GetScreen</b> ()</td></tr>
<tr class="separator:a79f17ba29805e53adb3c8debb81734dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a4df51ae1561c024f2fdea3d9852b228a"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_game_manager.html">GameManager</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_game_manager.html#a4df51ae1561c024f2fdea3d9852b228a">GetInstance</a> ()</td></tr>
<tr class="memdesc:a4df51ae1561c024f2fdea3d9852b228a"><td class="mdescLeft">&#160;</td><td class="mdescRight">GameManager클래스가 싱글톤이기에 생성된 객체를 받아오기 위한 함수  <a href="#a4df51ae1561c024f2fdea3d9852b228a">More...</a><br/></td></tr>
<tr class="separator:a4df51ae1561c024f2fdea3d9852b228a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h1><a class="anchor" id="게임매니저"></a>
게임매니저</h1>
<ul>
<li>소개 : 맵매니저, 플레이어 등을 가져와 사용, 게임을 동작시키는 중요 클래스 </li>
</ul>

<p>Definition at line <a class="el" href="_game_manager_8h_source.html#l00023">23</a> of file <a class="el" href="_game_manager_8h_source.html">GameManager.h</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a05c74507d748a75b12d0b9fb3f6a2096"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GameManager::Ending </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>엔딩 부분을 출력해주기 위한 함수. </p>
<dl class="section return"><dt>Returns</dt><dd>없음 </dd></dl>

<p>Definition at line <a class="el" href="_game_manager_8cpp_source.html#l00043">43</a> of file <a class="el" href="_game_manager_8cpp_source.html">GameManager.cpp</a>.</p>

<p>Referenced by <a class="el" href="_game_manager_8cpp_source.html#l00021">GameRun()</a>.</p>
<div class="fragment"><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;{</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    SDL_Rect dstrect; </div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    dstrect.x = 0; </div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    dstrect.y = 0;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    SDL_BlitSurface(EndBackGround, NULL, Screen, &amp;dstrect );</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    SDL_Flip(Screen);</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    <span class="keywordflow">while</span>(1)</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    {</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;        SDL_Event event;</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;        <span class="comment">// handle에 이벤트가 있다면,</span></div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;        <span class="keywordflow">if</span>( SDL_PollEvent( &amp;event ) )</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        {</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;            <span class="keywordflow">if</span>( event.type == SDL_KEYDOWN )</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;            {</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;                <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;            }</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;        }</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    }</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;}</div>
</div><!-- fragment -->
<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_game_manager_a05c74507d748a75b12d0b9fb3f6a2096_icgraph.png" border="0" usemap="#class_game_manager_a05c74507d748a75b12d0b9fb3f6a2096_icgraph" alt=""/></div>
<map name="class_game_manager_a05c74507d748a75b12d0b9fb3f6a2096_icgraph" id="class_game_manager_a05c74507d748a75b12d0b9fb3f6a2096_icgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="ad40e6b7cd216c78a6d1332206c07c5f0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GameManager::GameRun </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>게임에 대한 루프가 돌아갈 함수 </p>
<dl class="section return"><dt>Returns</dt><dd>없음 </dd></dl>
<p>맨 처음 메뉴를 출력</p>
<p>게임 루프를 돌려주는 함수</p>
<p>게임이 종료 된 후 출력해주느 엔딩화면 </p>

<p>Definition at line <a class="el" href="_game_manager_8cpp_source.html#l00021">21</a> of file <a class="el" href="_game_manager_8cpp_source.html">GameManager.cpp</a>.</p>

<p>References <a class="el" href="_game_manager_8cpp_source.html#l00043">Ending()</a>, <a class="el" href="_game_manager_8cpp_source.html#l00067">Menu()</a>, <a class="el" href="_game_manager_8cpp_source.html#l00193">Render()</a>, and <a class="el" href="_game_manager_8cpp_source.html#l00126">Updata()</a>.</p>
<div class="fragment"><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;{</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    <a class="code" href="class_game_manager.html#a14e1c3e5cb61d8fba4a87e78c35905be" title="메뉴 출력 함수.">Menu</a>();</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    </div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    <span class="keywordflow">while</span>(GameLoop)</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    {</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;        Sleep(200);</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;        <a class="code" href="class_game_manager.html#ac1bd6de1844831d097b24a13a0e6a5a5" title="플레이어 및 맵을 렌더링 해주는 부분.">Render</a>();</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;        <a class="code" href="class_game_manager.html#a90d63702413c8d2f2f1e848e820aaed8" title="게임 루프 중 데이터를 갱신해주는 함수.">Updata</a>();</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;        InputKey();</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;        SDL_Flip(Screen);</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    }</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    <a class="code" href="class_game_manager.html#a05c74507d748a75b12d0b9fb3f6a2096" title="엔딩 부분을 출력해주기 위한 함수.">Ending</a>();</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;}</div>
</div><!-- fragment -->
<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_game_manager_ad40e6b7cd216c78a6d1332206c07c5f0_cgraph.png" border="0" usemap="#class_game_manager_ad40e6b7cd216c78a6d1332206c07c5f0_cgraph" alt=""/></div>
<map name="class_game_manager_ad40e6b7cd216c78a6d1332206c07c5f0_cgraph" id="class_game_manager_ad40e6b7cd216c78a6d1332206c07c5f0_cgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a4df51ae1561c024f2fdea3d9852b228a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_game_manager.html">GameManager</a> * GameManager::GetInstance </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>GameManager클래스가 싱글톤이기에 생성된 객체를 받아오기 위한 함수 </p>
<dl class="section return"><dt>Returns</dt><dd>GameManager객체 </dd></dl>

<p>Definition at line <a class="el" href="_game_manager_8cpp_source.html#l00009">9</a> of file <a class="el" href="_game_manager_8cpp_source.html">GameManager.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;{</div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;    <span class="keywordflow">if</span>(Instance == NULL)</div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;    {</div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;        Instance = <span class="keyword">new</span> <a class="code" href="class_game_manager.html">GameManager</a>();</div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;    }</div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;    <span class="keywordflow">return</span> Instance;</div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a14e1c3e5cb61d8fba4a87e78c35905be"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GameManager::Menu </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>메뉴 출력 함수. </p>
<dl class="section return"><dt>Returns</dt><dd>없음 </dd></dl>

<p>Definition at line <a class="el" href="_game_manager_8cpp_source.html#l00067">67</a> of file <a class="el" href="_game_manager_8cpp_source.html">GameManager.cpp</a>.</p>

<p>Referenced by <a class="el" href="_game_manager_8cpp_source.html#l00021">GameRun()</a>.</p>
<div class="fragment"><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;{</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    SDL_Rect dstrect; </div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    dstrect.x = 0; </div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    dstrect.y = 0;</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    SDL_BlitSurface(MenuBackGround, NULL, Screen, &amp;dstrect );</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    SDL_Flip(Screen);</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    <span class="keywordflow">while</span>(1)</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    {</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;        SDL_Event event;</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;        <span class="comment">// handle에 이벤트가 있다면,</span></div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;        <span class="keywordflow">if</span>( SDL_PollEvent( &amp;event ) )</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;        {</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;            <span class="keywordflow">if</span>( event.type == SDL_KEYDOWN )</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;            {</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;                <span class="comment">// 눌린 키에 대한 동작을 설정해준다.</span></div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;                <span class="comment">// message 화면에 미리 설정한 메시지를 넣는다.</span></div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;                <span class="keywordflow">switch</span>( event.key.keysym.sym )</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;                {</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;                <span class="keywordflow">case</span> SDLK_1:</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;                    GameLoop = <span class="keyword">true</span>;</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;                    isSingleMode = <span class="keyword">true</span>;</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;                    <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;                <span class="keywordflow">case</span> SDLK_2:</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;                    GameLoop = <span class="keyword">true</span>;</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;                    isSingleMode = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;                    <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;                <span class="keywordflow">case</span> SDLK_3:</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;                    GameLoop = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;                    <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;                }</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;            }</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;        }</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    }</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;}</div>
</div><!-- fragment -->
<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_game_manager_a14e1c3e5cb61d8fba4a87e78c35905be_icgraph.png" border="0" usemap="#class_game_manager_a14e1c3e5cb61d8fba4a87e78c35905be_icgraph" alt=""/></div>
<map name="class_game_manager_a14e1c3e5cb61d8fba4a87e78c35905be_icgraph" id="class_game_manager_a14e1c3e5cb61d8fba4a87e78c35905be_icgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="af055cc09d2692980e407af88b7fa571d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GameManager::PlayerCrashCheck </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>플레이어의 충돌 여부를 체크를 해주는 함수. </p>
<p>맵과 플레이어간의 충돌을 이곳에서 체크를 함으로써 충돌을 관리해준다. </p>

<p>Definition at line <a class="el" href="_game_manager_8cpp_source.html#l00150">150</a> of file <a class="el" href="_game_manager_8cpp_source.html">GameManager.cpp</a>.</p>

<p>References <a class="el" href="_player_8cpp_source.html#l00025">Player::CrashCheck()</a>, <a class="el" href="_map_manager_8cpp_source.html#l00034">MapManager::CrashCheck()</a>, and <a class="el" href="_player_8cpp_source.html#l00094">Player::InitDraw_Player()</a>.</p>

<p>Referenced by <a class="el" href="_game_manager_8cpp_source.html#l00126">Updata()</a>.</p>
<div class="fragment"><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;{</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;    Type CrashTile = MapMg-&gt;<a class="code" href="class_map_manager.html#a4a980e18a8cdadcc9502d92e860440d7" title="맵을 이루는 것들에 대한 충돌을 체크">CrashCheck</a>(player-&gt;GetPlayerPos());</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    <span class="keywordflow">if</span>( WALL == CrashTile || player-&gt;<a class="code" href="class_player.html#adbedf72ff713fb76dd010d68ad3be184" title="플레이어 충돌 체크.">CrashCheck</a>(player-&gt;GetPlayerPos()))</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;    {</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;        <span class="keywordflow">if</span>(PlayerLife-- == 0)</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;        {</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;            GameLoop = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;        }</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;        player-&gt;<a class="code" href="class_player.html#a8bfc8c4d58b9767c45e395d4455b2724" title="플레이어 초기화 부분">InitDraw_Player</a>();</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;    }</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span>( ITEM == CrashTile)</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;    {</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;        player-&gt;IncreaseTail();</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    }</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;    <span class="keywordflow">if</span>(isSingleMode == <span class="keyword">false</span>){</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;        CrashTile = MapMg-&gt;<a class="code" href="class_map_manager.html#a4a980e18a8cdadcc9502d92e860440d7" title="맵을 이루는 것들에 대한 충돌을 체크">CrashCheck</a>(player2-&gt;GetPlayerPos());</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;        <span class="keywordflow">if</span>( WALL == CrashTile ||</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;            player-&gt;<a class="code" href="class_player.html#adbedf72ff713fb76dd010d68ad3be184" title="플레이어 충돌 체크.">CrashCheck</a>(player2-&gt;GetPlayerPos()))</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;        {</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;            <span class="keywordflow">if</span>(PlayerLife-- == 0)</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;            {</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;                GameLoop = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;            }</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;            player2-&gt;InitDraw_Player();</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;        }</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;        <span class="keywordflow">else</span> <span class="keywordflow">if</span>( ITEM == CrashTile)</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;        {</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;            player2-&gt;IncreaseTail();</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;        }</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;        <span class="keywordflow">else</span> <span class="keywordflow">if</span>(player2-&gt;CrashCheck(player-&gt;GetPlayerPos()))</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;        {</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;            <span class="keywordflow">if</span>(PlayerLife-- == 0)</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;            {</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;                GameLoop = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;            }</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;            player-&gt;<a class="code" href="class_player.html#a8bfc8c4d58b9767c45e395d4455b2724" title="플레이어 초기화 부분">InitDraw_Player</a>();</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;        }</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;    }</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;}</div>
</div><!-- fragment -->
<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_game_manager_af055cc09d2692980e407af88b7fa571d_cgraph.png" border="0" usemap="#class_game_manager_af055cc09d2692980e407af88b7fa571d_cgraph" alt=""/></div>
<map name="class_game_manager_af055cc09d2692980e407af88b7fa571d_cgraph" id="class_game_manager_af055cc09d2692980e407af88b7fa571d_cgraph">
</map>
</div>
</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_game_manager_af055cc09d2692980e407af88b7fa571d_icgraph.png" border="0" usemap="#class_game_manager_af055cc09d2692980e407af88b7fa571d_icgraph" alt=""/></div>
<map name="class_game_manager_af055cc09d2692980e407af88b7fa571d_icgraph" id="class_game_manager_af055cc09d2692980e407af88b7fa571d_icgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a90d63702413c8d2f2f1e848e820aaed8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GameManager::Updata </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>게임 루프 중 데이터를 갱신해주는 함수. </p>
<p>맵의 스테이지를 체크를 해주며 플레이어의 충돌여부, 플레이어의 <a class="el" href="class_game_manager.html#a90d63702413c8d2f2f1e848e820aaed8" title="게임 루프 중 데이터를 갱신해주는 함수.">Updata()</a>를 호출해준다. </p>

<p>Definition at line <a class="el" href="_game_manager_8cpp_source.html#l00126">126</a> of file <a class="el" href="_game_manager_8cpp_source.html">GameManager.cpp</a>.</p>

<p>References <a class="el" href="_player_8cpp_source.html#l00094">Player::InitDraw_Player()</a>, <a class="el" href="_game_manager_8cpp_source.html#l00150">PlayerCrashCheck()</a>, and <a class="el" href="_player_8cpp_source.html#l00041">Player::Updata()</a>.</p>

<p>Referenced by <a class="el" href="_game_manager_8cpp_source.html#l00021">GameRun()</a>.</p>
<div class="fragment"><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;{</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    <span class="keywordflow">if</span>(MapMg-&gt;GetStage() &gt;=2)</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    {</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;        GameLoop = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;        <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    }</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    <span class="keywordflow">if</span>(currectStage != MapMg-&gt;GetStage() ){</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;        currectStage = MapMg-&gt;GetStage();</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;        player-&gt;<a class="code" href="class_player.html#a8bfc8c4d58b9767c45e395d4455b2724" title="플레이어 초기화 부분">InitDraw_Player</a>();</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;        <span class="keywordflow">if</span>(isSingleMode == <span class="keyword">false</span>)</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;            player2-&gt;InitDraw_Player();</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    }</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    <a class="code" href="class_game_manager.html#af055cc09d2692980e407af88b7fa571d" title="플레이어의 충돌 여부를 체크를 해주는 함수.">PlayerCrashCheck</a>();</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    player-&gt;<a class="code" href="class_player.html#a2865af37879fb66858f82d8a88453521" title="플레이어의 물리적 계산 루프">Updata</a>();</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;    <span class="keywordflow">if</span>(isSingleMode == <span class="keyword">false</span>)</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;        player2-&gt;Updata();</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;}</div>
</div><!-- fragment -->
<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_game_manager_a90d63702413c8d2f2f1e848e820aaed8_cgraph.png" border="0" usemap="#class_game_manager_a90d63702413c8d2f2f1e848e820aaed8_cgraph" alt=""/></div>
<map name="class_game_manager_a90d63702413c8d2f2f1e848e820aaed8_cgraph" id="class_game_manager_a90d63702413c8d2f2f1e848e820aaed8_cgraph">
</map>
</div>
</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_game_manager_a90d63702413c8d2f2f1e848e820aaed8_icgraph.png" border="0" usemap="#class_game_manager_a90d63702413c8d2f2f1e848e820aaed8_icgraph" alt=""/></div>
<map name="class_game_manager_a90d63702413c8d2f2f1e848e820aaed8_icgraph" id="class_game_manager_a90d63702413c8d2f2f1e848e820aaed8_icgraph">
</map>
</div>
</p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following files:<ul>
<li>snakeProject/<a class="el" href="_game_manager_8h_source.html">GameManager.h</a></li>
<li>snakeProject/<a class="el" href="_game_manager_8cpp_source.html">GameManager.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_game_manager.html">GameManager</a></li>
    <li class="footer">Generated on Wed Mar 20 2013 21:43:37 for SnakeProject by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.3.1 </li>
  </ul>
</div>
</body>
</html>
